<?php
#-------------------------------------------------------------------------------
#SETING KOMPOSISI MENU
#-------------------------------------------------------------------------------
    #Top menu tatausaha
    if($this->session->userdata('s_hak_akses') == '1'){
        $menu = array(
            'Manajemen_user'        => "Data User",
            'Manajemen_arsip'       => "Data Arsip",
            'Manajemen_klasifikasi' => "Klasifikasi",
            'Manajemen_report'      => "Report"
        );
    #Top menu kepala balai
    }else if($this->session->userdata('s_hak_akses') == '2'){
        $menu = array(
            'Manajemen_arsip'       => "Data Arsip",
            'Manajemen_klasifikasi' => "Klasifikasi",
            'Manajemen_report'      => "Report"
        );
    #Top menu pegawai
    }else if($this->session->userdata('s_hak_akses') == '3'){
        $menu = array(
            'Manajemen_arsip'       => "Data Arsip",
            'Manajemen_klasifikasi' => "Klasifikasi",
            'Manajemen_report'      => "Report"
        );
    #Apabila belum login
    }else{
        $menu = array(
            'Manajemen_user'        => "Data User",
            'Manajemen_arsip'       => "Data Arsip",
            'Manajemen_klasifikasi' => "Klasifikasi",
            'Manajemen_report'      => "Report",
            'Form_login'            => "Log In"
        );
    }
?>


<div id="menu">
    <ul class="menu">
    <?php
#-------------------------------------------------------------------------------
#TAMPILKAN MENU
#-------------------------------------------------------------------------------
        #Tampilkan data menu
        foreach ($menu as $id => $nama_menu) {
            echo "<li>";
                echo anchor('Site/menu/'.$id, '<span>'.$nama_menu.'</span>');
            echo "</li>";
        }
        #Tampilkan logout
        if($this->session->userdata('s_hak_akses') != NULL){
            echo "<li>";
            echo anchor('Site/log_out', '<span>Log Out</span>');
            echo "</li>";
        }
    ?>
    </ul>
</div>